import net.mikekohn.java_grinder.SegaGenesis;
/*
bmp2sega - Copyright 2015 by Michael Kohn
Reading: D:\programs\JAVA Grinder\java_grinder\Projects\test\hand.bmp
              ID: BM
            Size: 1590
          Offset: 54
     Header Size: 40
           Width: 16
          Height: 32
    Color Planes: 1
  Bits Per Pixel: 24
     Compression: 0
      Image Size: 1536
  Horizontal Res: 3780
    Vertical Res: 3780
  Palette Colors: 0
Important Colors: 0
readSpriteData: 1536
*/
public class ImageJavaGrinder
{
  public static void run()
  {
    SegaGenesis.setPaletteColors(palette);
    SegaGenesis.setPatternTable(pattern);
    SegaGenesis.setImageData(image);
  }

  public static int[] pattern =
  {
    // Pattern 0
    0x00000122, 0x00012210, 0x00121000, 0x01210000,
    0x02100000, 0x02100000, 0x12000000, 0x21000000,
    // Pattern 1
    0x20000000, 0x20000000, 0x20020000, 0x20020000,
    0x20020000, 0x20020000, 0x20020020, 0x20020020,
    // Pattern 2
    0x20020020, 0x20020020, 0x21020020, 0x12120020,
    0x01220020, 0x00020020, 0x00020020, 0x00020020,
    // Pattern 3
    0x00020020, 0x00020020, 0x00022020, 0x00022020,
    0x00002220, 0x00000020, 0x00000022, 0x00000002,
    // Pattern 4
    0x22210000, 0x00121000, 0x00012230, 0x00000120,
    0x00000021, 0x00000021, 0x00000012, 0x00000002,
    // Pattern 5
    0x00000002, 0x00000002, 0x00000002, 0x00000002,
    0x00000002, 0x00000002, 0x02000002, 0x02002002,
    // Pattern 6
    0x02002002, 0x02002002, 0x02002002, 0x02002002,
    0x02002002, 0x02002002, 0x02002002, 0x02002004,
    // Pattern 7
    0x02002122, 0x02002210, 0x02002000, 0x02002000,
    0x02012000, 0x02223000, 0x02000000, 0x22000000,

  };

  public static short[] image =
  {
    0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
  };

  public static short[] palette =
  {
    0xeee, 0xccc, 0x000, 0xaaa, 0x444, 0x000, 0x000, 0x000,
    0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000,
  };
}

